package Lesson4;

import java.util.Arrays;

public class sort {

	public static void main(String[] args) {

		int [][] a = {
				{9,4,7,1},
				{2,9,4,7}
				};
		int[] b = new int [4];
		int save = 0;
		
		for (int i = 0; i < a.length; i++)
		{
			for (int j = 0; j < a[i].length; j++)
			{
				b[j] = a[i][j];
				
			}
			
		for (int q = 0; q<3;q++)
		{	
			
			for (int j = 0; j < 3; j++) 
			{
				
					if (b[j] > b[j+1])
					{
						save = b[j];
						b[j] = b[j+1];
						b[j+1] = save;
					}
					System.out.println("1"+Arrays.toString(b));

			}
			
			
		}
			System.out.println(Arrays.toString(b));
		}
		
		
	}

}
